package com.jeecg.dao;


import java.util.List;

import org.jeecgframework.minidao.annotation.Arguments;
import org.jeecgframework.minidao.annotation.MiniDao;
import org.jeecgframework.minidao.annotation.Sql;
import org.jeecgframework.minidao.hibernate.MiniDaoSupportHiber;

import com.jeecg.entity.User;


@MiniDao("userDao")
public interface UserDao extends  MiniDaoSupportHiber<User> {
	
	@Arguments("user")
	public void addUser(User user);
	
	@Arguments("user")
	public int updateUser(User user);
	
	@Sql("SELECT count(*) FROM tbs_user")
	public int getCount();
	
	@Sql("SELECT id,name,age from tbs_user")	
	public List<User> findAll();
	
	@Arguments("id")
	public User findById(String id);
	
	@Arguments("name")
	public List<User> findByName(String name);
}
